#!/usr/bin/env python3

import time

a_time = time.time()
a = 0
while True:
    if a == 10000000:
        break
    a += 1

print("A cost:",time.time()-a_time,a)

b_time = time.time()
b = 0
while b < 10000000:
    break
    b += 1

print("B cost:",time.time()-b_time,b)

